package com.itheima;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/books")
public class BookController {
@GetMapping
    public String getById(){
        System.out.println("springboot is running");
        return "springboot is running";
    }


    @RequestMapping("/query")
    public String query(String username){
        System.out.println("springboot is running");
        return "查询成功springboot is running";
    }


    @RequestMapping("/login")
    @ResponseBody
    public String login(String username,String password){
        System.out.println("springboot is running"+username+password);
        return "springboot is running";
    }
    @RequestMapping("/logout")
    @ResponseBody
    public String logout(){
        System.out.println("springboot is running");
        return "springboot is running";
    }


}
